import JSEncrypt from 'jsencrypt'
const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAK0VvP64CpcSGjaovjNYqzpP4YRXLieX\n' +
  'tzXjPyZzh+rOBxVfAbH4RNvI1KREvpTZM7JIzgXR8JKYHWbSpLEr9qUCAwEAAQ=='
// 加密
export function encrypt(txt) {
  const encryptor = new JSEncrypt()
  encryptor.setPublicKey(publicKey) // 设置公钥
  return encryptor.encrypt(txt) // 对数据进行加密
}
